package com.gqj.meter.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gqj.meter.mapper.WarningConfigMapper;
import com.gqj.meter.domain.WarningConfig;
import com.gqj.meter.service.IWarningConfigService;

/**
 * 报警配置Service业务层处理
 *
 * @author lxq
 * @date lxq-02-10
 */
@Service
public class WarningConfigServiceImpl implements IWarningConfigService
{
    @Autowired
    private WarningConfigMapper warningConfigMapper;

    /**
     * 查询报警配置
     *
     * @param configId 报警配置主键
     * @return 报警配置
     */
    @Override
    public WarningConfig selectWarningConfigByConfigId(Long configId)
    {
        return warningConfigMapper.selectWarningConfigByConfigId(configId);
    }

    /**
     * 查询报警配置列表
     *
     * @param warningConfig 报警配置
     * @return 报警配置
     */
    @Override
    public List<WarningConfig> selectWarningConfigList(WarningConfig warningConfig)
    {
        return warningConfigMapper.selectWarningConfigList(warningConfig);
    }

    /**
     * 新增报警配置
     *
     * @param warningConfig 报警配置
     * @return 结果
     */
    @Override
    public int insertWarningConfig(WarningConfig warningConfig)
    {
        return warningConfigMapper.insertWarningConfig(warningConfig);
    }

    /**
     * 修改报警配置
     *
     * @param warningConfig 报警配置
     * @return 结果
     */
    @Override
    public int updateWarningConfig(WarningConfig warningConfig)
    {
        return warningConfigMapper.updateWarningConfig(warningConfig);
    }

    /**
     * 批量删除报警配置
     *
     * @param configIds 需要删除的报警配置主键
     * @return 结果
     */
    @Override
    public int deleteWarningConfigByConfigIds(Long[] configIds)
    {
        return warningConfigMapper.deleteWarningConfigByConfigIds(configIds);
    }

    /**
     * 删除报警配置信息
     *
     * @param configId 报警配置主键
     * @return 结果
     */
    @Override
    public int deleteWarningConfigByConfigId(Long configId)
    {
        return warningConfigMapper.deleteWarningConfigByConfigId(configId);
    }
}
